<% # The following is used when the browser doesn't have javascript enabled %>
<% classAttr = cycle("", "class=\"even\"") %>
<% @options = params.merge(:controller => '/companies', :action => "Show", :id => company.send("#{Company.primary_key}")) %>
<tr <%= classAttr %> id="<%= element_row_id(@options) %>" <%= "style=\"display: none;\"" if hidden %>>
    <% column_value = company.stock_symbol rescue nil %>
    <td class="<%= column_class(scaffold_columns[0].name, column_value, current_sort(params), scaffold_columns[0].class_name) %>" >
      <%= link_to format_emtpy(column_value), company_path(@options[:id]), {:id => column_value} %>
      <%= javascript_tag "control_modal_hover('#{column_value}', STOCK_HOVER + '#{column_value}');"  unless  @paginator.all? %>
    </td>
     <% column_value = company.name rescue nil %>
    <td class="<%= column_class(scaffold_columns[1].name, column_value, current_sort(params), scaffold_columns[1].class_name) %>" >
      <%= format_emtpy column_value %>
    </td>
    <% column_value = company.type.name rescue nil %>
    <% column_id = column_value.downcase + company.id.to_s rescue nil %>
    <td class="<%= column_class(scaffold_columns[2].name, column_value, current_sort(params), scaffold_columns[3].class_name) %>" >
      <%= link_to format_emtpy(column_value), { :action => "sector", :id => column_value.downcase }, {:id => column_id}%>
      <%= javascript_tag "control_modal_hover('#{column_id}', SECTOR_HOVER + '#{column_value}');"  unless  @paginator.all? %>
     </td>
     <% column_value = company.trading_market.last_traded_price rescue nil %>
    <td class="<%= column_class(scaffold_columns[3].name, column_value, current_sort(params), scaffold_columns[2].class_name) %>" >
      <%= column_value %>
    </td>
     <% column_value = company.trading_market.price_change_percent rescue nil %>
    <td class="<%= column_class(scaffold_columns[4].name, column_value, current_sort(params), scaffold_columns[2].class_name) %>" >
      <%= number_change_html(company.trading_market.price_change) %>&nbsp; (<%= show_percent number_change_html(column_value) %>)
    </td>
    <% column_value = company.trading_market.last_traded_date rescue nil %>
    <td class="<%= column_class(scaffold_columns[5].name, column_value, current_sort(params), scaffold_columns[2].class_name) %>" >
      <% time_formatted = formatted_time(column_value) %>
      <% if time_formatted %>
           <% column_id = time_formatted + company.id.to_s rescue nil %>
           <%= link_to time_formatted, { :action => "traded_on", :id => format_time_param(column_value) }, {:id => column_id} %>
           <%= javascript_tag "control_modal_hover('#{column_id}', DATE_HOVER + '#{time_formatted}');" unless  @paginator.all?%>
        <% else %>
          -
        <% end %>
    </td>
    
</tr>
